<!-- MAIN CONTENT -->

<div id="content">
    <div smart-include="sensor/views/sub-header.tpl.html"></div>
   
    <!-- widget grid -->
    <section id="widget-grid" class="">
        <!-- row -->
        <div class="row">
            <article class="col-sm-12">
                <!-- new widget -->
                <div class="jarviswidget" id="wid-id-0" data-widget-togglebutton="false" data-widget-editbutton="false" data-widget-fullscreenbutton="false" data-widget-colorbutton="false" data-widget-deletebutton="false">
                    <header>
                        <ul class="nav nav-tabs pull-left in" id="myTab">
                            <li class="active">
                                <a data-toggle="tab" href="#s1"><i class="fa fa-clock-o"></i> <span class="hidden-mobile hidden-tablet">实时数据1</span></a>
                            </li>

                            <li>
                                <a data-toggle="tab" href="#s2"><i class="fa fa-facebook"></i> <span class="hidden-mobile hidden-tablet">实时数据2</span></a>
                            </li>
                        </ul>
                    </header>
                    <!-- widget div-->
                    <div class="no-padding">
                        <!-- widget edit box -->             
                        <!-- end widget edit box -->
                        <!-- content -->
                        <div id="myTabContent" class="tab-content">
                                <div class="tab-pane fade active in" id="s1">
                                    <div class="widget-body-toolbar bg-color-white">
                                        <div class="panel-group" id="my-group">
                                            <div class="panel" ng-repeat="obj in deviceList">
                                                <div class="panel-heading">
                                                    <a data-toggle="collapse" href="#xyj{{obj.id}}" ng-click="getDevice(obj.projectid)" data-parent="#my-group" class="panel-title">
                                                        <p class="text-align-center">
                                                            设备分组名称：{{obj.name}}
                                                        </p>
                                                    </a>
                                                </div>
                                                <div id="xyj{{obj.id}}" class="collapse panel-collapse">
                                                    <div class="panel-body">
                                                        <div class="row alldev">
                                                            <div class="col-xs-12 col-sm-6 col-md-2 col-lg-2 actTop">
                                                                <div class="data_header">
                                                                    <div class="text_align_left nameSize deviceS">
                                                                        <b> 设备号:{{deviceid}}</b>
                                                                    </div>
                                                                </div>
                                                                <div class="data_body">
                                                                    <div class="clearfix">
                                                                        <div ng-repeat="dev in DATAS" class="col-sm-12 actData data_list">
                                                                            <p class="pull-left" style="width:50%">
                                                                                {{dev.name}}
                                                                            </p>
                                                                            <p class="pull-left valueColor valueSize">
                                                                                <b>{{dev.data}}</b>
                                                                            </p>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="data_footer">
                                                                    <button class="btn_none width30"><span class="{{i.status | status}}">在线</span></button>
                                                                    <button class="btn_none width30">
                                                                        <a ui-sref="app.sensor.watchcharts({deviceid:i.id})"><img src="styles/img/传感器曲线.png"></a>
                                                                    </button>
                                                                    <button class="btn_none width30">
                                                                        <a ui-sref="app.sensor.historicaldata({'port':8053,'deviceid':i.id})"><img src="styles/img/传感器列表.png"></a>
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>                        
                                    </div>
                                </div>
                                <!-- end s1 tab pane -->
                                <div class="tab-pane fade" id="s2">
                                    <div class="widget-body-toolbar bg-color-white">
                                        <div class="table-responsive">
                                            <table class="table table-bordered table-hover no-margin font-sml table-striped sensor_table">
                                                <thead>
                                                    <tr>
                                                        <th class="text-align-center">设备编号</th>
                                                        <th class="text-align-center">名称</th>
                                                        <th class="text-align-center">值</th>
                                                        <th class="text-align-center">状态</th>
                                                        <th class="text-align-center">曲线</th>
                                                        <th class="text-align-center">列表</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr ng-repeat="i in DATAS">
                                                        <td class="text-align-center">{{i.id}}</td>
                                                        <td class="text-align-center">{{i.name}}</td>
                                                        <td class="text-align-center">
                                                            <span class="blink">{{i.data}}</span>
                                                        </td>
                                                        <td class="text-align-center"><span class="{{i.status | status}}">在线</span></td>
                                                        <td class="text-align-center">
                                                            <a ui-sref="app.sensor.watchcharts({deviceid:i.id})"><img src="styles/img/传感器曲线.png"></a>
                                                        </td>
                                                        <td class="text-align-center">
                                                            <a ui-sref="app.sensor.historicaldata({'port':8053,'deviceid':i.id})"><img src="styles/img/传感器列表.png"></a>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <!-- end s2 tab pane -->
                            </div>
                        <!-- end content -->
                    </div>
                    <!-- end widget div -->
                </div>
                <!-- end widget -->

            </article>
        </div>

        <!-- end row -->
    </section>
    <!-- end widget grid -->
</div>
